package com.dd.controller;
import com.dd.pojo.Admin;
import com.dd.service.AdminService;
import com.dd.service.AdminServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/admin")
public class AdminController {
    @Autowired
    AdminService adminService;

    @RequestMapping("/find")
    @ResponseBody
    public String findAdmin(String aname,int pwd) {
        Admin admin1 = adminService.findAdmin(aname, pwd);
        if (admin1 != null) {
            return "1";
        } else {
            return "0";
        }
    }

    @RequestMapping("/ad")
    public String Test(){
        return "/jsp/user_vip.html";
    }
}
